<?php

	$date = $row['birthdate'];
	list($day, $month, $year) = split('[/.-]', $date);

	$mobNo = $row['mobNo'];
	list($stdCode, $mobNo) = split('[/.-]', $mobNo);

	$gen = $row['gender'];

       	
?>

<table width="60%" cellspacing="5">

	<span class=".arial-12pt darkGray" style=" margin-left: 27px;">Enter your personal details.</span>

	<form method="post" action="personalDetailsProcess.php">

		<tr><td colspan="2"><input type="hidden" name="user_id" id="user_id" value="<?php echo $row['user_id'];?>"></td></tr><tr><td colspan="2"></td></tr>

		<tr>

			<td class="arial-10pt darkGray">Gender<span style="color: #F00;">*</span>:</td>

			<td class="arial-10pt">
							
					<?php
						if ($gen == 'male')
						{
					?>
					<input type="radio" name="gender" id="male" value="male" CHECKED>Male
					<input type="radio" name="gender" id="female"value="female">Female
					<?php 
						}
						else if($gen =='female')
						{
					?>
					<input type="radio" name="gender" id="male" value="male">Male
					<input type="radio" name="gender" id="female"value="female" CHECKED>Female
					<?php 
						}
					?>
			
			</td>

		</tr>

		<tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr>

		<tr>

			<td class="arial-10pt darkGray">Date of birth:</td>

			<td>
			
				<select name="dd" id="dd" class="arial-10pt" value="">
					<option><?php echo $day;?></option>
					<?php
						for($dd=1;$dd!=10;$dd++)
						{	
							if($day!=$dd)
							{	
							echo "<option>0".$dd."</option>";
							}
						}
						for($d=10;$d!=32;$d++)
						{
							if($day!=$d)
							{
							echo "<option>".$d."</option>";
							}
						}
					?>
				</select>

				<select name="mm" id="mm" class="arial-10pt">
					<option><?php echo $month;?></option>
					<?php
						for($m=1;$m!=10;$m++)
						{
							if($month!=$m)
							{
							echo "<option>0".$m."</option>";
							}
						}
						for($n=10;$n!=13;$n++)
						{	
							if($month!=$n)
							{
								echo "<option>".$n."</option>";
							}
						}
					?>
				</select>

				<select name="yy" id="yy" class="arial-10pt">
					<option><?php echo $year;?></option>
					<?php
						for($y=2011;$y!=1899;$y--)
						{
							if($month!=$y)
							{
								echo "<option>".$y."</option>";
							}
						}
					?>
				</select>
				
			</td>

		</tr>

		<tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr>

		<tr>

			<td class="arial-10pt darkGray">Mobile number:</td>

			<td>
			
				<input type="text" name="stdCode" id="stdCode" size="3" id="regtextbox" value="<?php echo $stdCode;?>">

				<input type="text" name="phNo" id="phNo" size="15" id="regtextbox" value="<?php echo $mobNo;?>">

			</td>

		</tr>

				<tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr>

		<tr>

			<td>&nbsp;</td>

			<td>
			
				<input type="checkbox" name="num" id="num">

				<span class="font8">Display my number to everyone</span>

			</td>

		</tr>

				<tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr>


		<tr>

			<td class="arial-10pt darkGray">Location:</td>

			<td align="left">
			
				<select name="location" id="location">
					
					<option>Select</option>

						<?php
							$con = mysql_query('select * from countries order by country_id');

							while($row = mysql_fetch_array($con)){

								echo "<option>";

								echo $row['name']."</br>";

								echo "</option>";
							}
						?>

				</select>
				
			</td>

		</tr>

				<tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr>


		<tr>

			<td align="left">&nbsp;</td>

			<td>

				<input type="submit" value="" name="cUnmSubmit" id="cUnmSubmit">
			
				<input type="reset" name="reset" value="Reset" class="textblue font12" style="background:#ffffff none no-repeat 0 0; border: none;">

			</td>

		</tr>

	</form>

</table>
